Microsoft DirectX 8.1 (C++)

IPin::QueryAccept

The QueryAccept method determines whether the pin accepts a specified media type.

Syntax

HRESULT QueryAccept(
  const AM_MEDIA_TYPE *pmt
);

Parameters

pmt

[in] Pointer to an AM_MEDIA_TYPE structure that specifies the media type.

Return Value

Returns S_OK if the media type is acceptable. Otherwise, returns S_FALSE.

Remarks

A return value of S_OK indicates that the pin will accept the media type, either on the next sample, or after a pin reconnection. The implementation should take into account the current state of the filter, including connections on other pins, and any properties that can be set on the filter.

If the filter is running, a return value of S_OK is ambiguous. The pin might accept a format change on the next media sample, without reconnecting; or it might need to reconned. If the pin supports the IPinConnection interface, call the IPinConnection::DynamicQueryAccept method, which specifically tests whether the pin can accept the new type without reconnecting.

See Also